package i_thread;
// Thread 우선권 
// make : pwg
// date : 2003
// note : 
// ========================================

public class PriorityEx extends Thread
{
	String name;
	public PriorityEx(String s)
	{
		name=s;
	}

	public void run()
	{
		for(int i=0; i<15 ; i++)
			System.out.println(name + "이 실행됨");

		try
		{
			Thread.sleep(1);
		}
		catch (Exception e)
		{
		}
	}

	public static void main(String[] args) 
	{
		PriorityEx t1=new PriorityEx("Max");
		PriorityEx t2=new PriorityEx("Norm");
		PriorityEx t3=new PriorityEx("Min");

		t1.setPriority(Thread.MAX_PRIORITY);
		t2.setPriority(Thread.NORM_PRIORITY);
		t3.setPriority(Thread.MIN_PRIORITY);

		t3.start();
		t2.start();
		t1.start();

	}
}
